// js-cookie是一个操作cookie的插件
import Cookies from 'js-cookie'

const TokenKey = 'hr-cms-token'

// 获取token=》从本地cookie中获取
export function getToken () {
  return Cookies.get(TokenKey)
}

// 存储token=》存储token到本地cookie
export function setToken (token) {
  return Cookies.set(TokenKey, token)
}
// 删除token=》删除本地存储在cookie里的token
export function removeToken () {
  return Cookies.remove(TokenKey)
}
